From c1245e9d5bf311b5a3267ea4b077a16561fcf439 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 13 Mar 2015 10:39:50 +0000 Subject: [PATCH] xen: arm: correct arm64 version of gva_to_ma_par The implementation was backwards and checked that the guest could read when asked about write and vice versa. This is an update to the fix for XSA-98. Reported-by: Tamas K Lengyel Signed-off-by: Ian Campbell --- xen/include/asm-arm/arm64/page.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h index 1fd416d4b2..e7a761dd5a 100644 --- a/xen/include/asm-arm/arm64/page.h +++ b/xen/include/asm-arm/arm64/page.h @@ -89,9 +89,9 @@ static inline uint64_t gva_to_ma_par(vaddr_t va, unsigned int flags) uint64_t par, tmp = READ_SYSREG64(PAR_EL1); if ( (flags & GV2M_WRITE) == GV2M_WRITE ) - asm volatile ("at s12e1r, %0;" : : "r" (va)); - else asm volatile ("at s12e1w, %0;" : : "r" (va)); + else + asm volatile ("at s12e1r, %0;" : : "r" (va)); isb(); par = READ_SYSREG64(PAR_EL1); WRITE_SYSREG64(tmp, PAR_EL1); -- 2.30.2